<?php 
require '../../vendor/autoload.php';

use database\DnFile;
use utils\PathTool;

$fid 	= $_GET["id"];
$uid 	= $_GET["uid"];
$sizeLoc= $_GET["sizeLoc"];
$per	= $_GET["perLoc"];
$cbk 	= $_GET["callback"];//jsonp
$per	= PathTool::url_decode($per);
$sizeLoc= PathTool::url_decode($sizeLoc);

if (   empty($fid)
	|| empty($cbk)
	|| empty($sizeLoc) )
{
	echo $cbk . "({\"value\":0})";
	return;
}

$db = new DnFile();
$db->process($fid, $uid, $sizeLoc, $per);

echo $cbk . "({\"value\":1})";
?>